package com.efa.backend.base.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.efa.backend.base.entity.ProductNews;
import com.efa.backend.base.service.ProductNewsService;

/**
 * @Description: TODO
 * @author zhaoxin
 * @date 2014年3月14日 下午9:25:22
 * @version V1.0
 */

@Controller
public class ProductNewsController {
	@Autowired
	private ProductNewsService productNewsService;

	/**
	 * 新闻信息查询
	 * 
	 * @param prdId 产品ID
	 * @return
	 */
	@RequestMapping(value = "/news/query/{prdId}", method = RequestMethod.GET)
	@ResponseBody
	public List<ProductNews> productQuery(@PathVariable("prdId") long prdId) {
		return this.productNewsService.findByProductDetail(prdId);
	}
}
